package com.ruoyi.logistic.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.logistic.domain.HomeNavigationBar;
import com.ruoyi.logistic.service.IHomeNavigationBarService;
import com.ruoyi.logistic.service.NetworkClientTagService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/client")
@Api(tags = "客户")
public class NetworkClientController {
    @Autowired
    private NetworkClientTagService networkClientTagService;

    @ApiOperation("查询客户列表")
    @GetMapping("/selectByName")
    public R selectByName(String name){
        if (name == null){
            return R.ok(networkClientTagService.selectList());
        }
        return R.ok(networkClientTagService.selectByName(name));
    }
}
